#pragma once
#ifndef FILEINFO_H
#define FILEINFO_H

#include <fstream>
#include <string>
#include <sys\stat.h>
#include <time.h>

#define FILENAME_SIZE 256

namespace Utilities
{

	class FileInfo{
	private:
		const char*		filename;
		short*		flag_started;
		bool*			modified;
		bool*			exists;
		long*			size;
		int*			timestamp;
		
		//  ---
		void			DefaultProccs();
		bool			vFileExists();
		int				vGetsModifiedTime();
	public:
		FileInfo(const char* filename);
		~FileInfo(void);

		// operators & Pointer Obtainers
		FileInfo&		operator=(FileInfo &FI);
		const char*&	pGetFileName();
		bool*&			pGetModifiedFlag();
		bool*&			pGetExistsFlag();
		long*&			pGetSize();
		int*&			pGetTimeStamp();

		// Modifiers
		void			pSetFileName(const char& filename);
		void			pSetModifiedFlag(bool& modified);
		void			pSetExistsFlag(bool& exists);
		void			pSetSize(long& size);
		void			pSetTimeStamp(int& timestamp);

		// External Actions
		void			ReloadFileInfo();
		void			showFileInfo();
		// External Obtainers
		const char*		FileName();
		bool			Modified();
		bool			Exists();
		long			Size();
		int				TimeStamp();
	};
}
#endif